﻿using Motar.UnityExtensions;

namespace Motar.Web.Mvc.UnityExtensions
{

    /// <summary>
    /// 
    /// </summary>
    public class UnityMvcBootstrapperExtension<TInitializer> : UnityBootstrapperExtension where TInitializer : MvcInitializer
    {

        /// <summary>
        /// 
        /// </summary>
        protected override void ConfigureOthers()
        {
            base.ConfigureOthers();

            RegisterIfMissing<System.Web.Mvc.IDependencyResolver, DependencyResolver>(true);
        }

        /// <summary>
        /// 
        /// </summary>
        protected override void ConfigureApplication()
        {
            RegisterIfMissing<IApplicationInitializer, TInitializer>(false);
        }
    }
}
